#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/signal.h>
#include<sys/wait.h>

int main(char argc,char*argv[])
{

    pid_t id=fork();
    if(id==0){
      printf("程序替换开始\n");
      execl("./depend","depend",NULL);//子进程程序替换
      exit(1); 
      }
    pid_t rid=waitpid(id,NULL,0);
    if(rid>0)
    {
      printf("wait success\n");
    }
  return 0;
}
